<template>
  <div class="layout-container">
    <div class="back-header" @click="goBack">
      <span class="back-arrow">←</span>
      <span>返回</span>
    </div>
    <div class="content-container">
      <NuxtLoadingIndicator />
      <GlobalLoading />
      <NuxtPage />
    </div>
  </div>
</template>

<script setup>
const router = useRouter()

const goBack = () => {
  router.back()
}
</script>

<style scoped>
.layout-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.back-header {
  padding: 12px 16px;
  background-color: white;
  display: flex;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.back-arrow {
  margin-right: 4px;
  font-size: 18px;
}

.content-container {
  flex: 1;
  overflow: auto;
}
</style>